﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Antlr.Runtime;

namespace XYZCompiler.ResultDialog
{
    public partial class LexerResult : Form
    {
        CommonTokenStream result;
        public LexerResult()
        {
            InitializeComponent();
        }
        public LexerResult(object result)
        {
            this.result = result as CommonTokenStream;
            if (this.result == null)
            {
                MessageBox.Show(StringRes.ResultDialogInputError);
                DialogResult = DialogResult.Abort;
            }
            InitializeComponent();

        }

        private void LexerResult_Load(object sender, EventArgs e)
        {
            //IToken t;
            //string s;
            //result.Reset();
            //var p = new XYZParser(result);
            //while ((t = result.()).Type != -1)
            //{
            //    s += p.TokenNames[t.TokenIndex];
            //    //   CompilerHelper.Debug(t.Text + t.Line.ToString() + t.CharPositionInLine.ToString());
            //}
            //MessageBox.Show(s);
            ////lexer.Error -= ErrorHandler;
        }
    }
}
